<!DOCTYPE html>
<html>

	<head>
		<meta charset="UTF-8">
		<title>捕鱼达人</title>
		<style>
			body {
				background: black url(game_bg_2_hd.jpg) no-repeat center top;
			}
			
			#fish {
				width: 516px;
				height: 273px;
				position: absolute;
				left: 260px;
				top: 20px;
				background: url(shark2.png) 0px 0px no-repeat;
			}
		</style>
	</head>

	<body>
		<div id="fish"></div>

		<script>
			var x = 20;
			var bgy = 0;

			function move() {
				x = x + 5;
				fish.style.left =x+"px";
				bgy = bgy - 273;
				fish.style.background = "url(shark2.png) 0px" + bgy + "px";
				if(bgy == -2184) {
					bgy = 0;
				}

			}
			setInterval(move, 100);
		</script>

	</body>

</html>